<div id="changeContab">
  <nz-tabset [nzAnimated]="false">
    <nz-tab nzTitle="秒">
      <nz-radio-group [(ngModel)]="second.cronEvery">
        <label [ngStyle]="style" nz-radio nzValue="1">每一秒钟</label>
        <label [ngStyle]="style" nz-radio nzValue="2">每隔<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="second.incrementIncrement" [nzMin]="1" [nzMax]="60" [nzStep]="1"></nz-input-number>秒执行，从
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="second.incrementStart" [nzMin]="0"
            [nzMax]="59" [nzStep]="1"></nz-input-number>秒开始
        </label>
        <label [ngStyle]="style" nz-radio nzValue="3">具体秒数(可多选)<nz-select nzMode="tags" [nzMaxTagCount]="3"
            [nzSize]="'small'" class="ml-sm" style="width: 70%;" nzPlaceHolder="请选择"
            [(ngModel)]="second.specificSpecific">
            <nz-option *ngFor="let option of s60" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
        <label [ngStyle]="style" nz-radio nzValue="4">周期从<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="second.rangeStart" [nzMin]="1" [nzMax]="60" [nzStep]="1"></nz-input-number>到
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="second.rangeEnd" [nzMin]="0" [nzMax]="59"
            [nzStep]="1"></nz-input-number>秒
        </label>
      </nz-radio-group>
    </nz-tab>
    <nz-tab nzTitle="分">
      <nz-radio-group [(ngModel)]="minute.cronEvery">
        <label [ngStyle]="style" nz-radio nzValue="1">每一分钟</label>
        <label [ngStyle]="style" nz-radio nzValue="2">每隔<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="minute.incrementIncrement" [nzMin]="1" [nzMax]="60" [nzStep]="1"></nz-input-number>分执行，从
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="minute.incrementStart" [nzMin]="0"
            [nzMax]="59" [nzStep]="1"></nz-input-number>分开始
        </label>
        <label [ngStyle]="style" nz-radio nzValue="3">具体分钟数(可多选)<nz-select nzMode="tags" [nzMaxTagCount]="3"
            [nzSize]="'small'" class="ml-sm" style="width: 70%;" nzPlaceHolder="请选择"
            [(ngModel)]="minute.specificSpecific">
            <nz-option *ngFor="let option of s60" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
        <label [ngStyle]="style" nz-radio nzValue="4">周期从<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="minute.rangeStart" [nzMin]="1" [nzMax]="60" [nzStep]="1"></nz-input-number>到
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="minute.rangeEnd" [nzMin]="0" [nzMax]="59"
            [nzStep]="1"></nz-input-number>分
        </label>
      </nz-radio-group>
    </nz-tab>
    <nz-tab nzTitle="时">
      <nz-radio-group [(ngModel)]="hour.cronEvery">
        <label [ngStyle]="style" nz-radio nzValue="1">每一小时</label>
        <label [ngStyle]="style" nz-radio nzValue="2">每隔<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="hour.incrementIncrement" [nzMin]="0" [nzMax]="23" [nzStep]="1"></nz-input-number>小时执行，从
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="hour.incrementStart" [nzMin]="0"
            [nzMax]="23" [nzStep]="1"></nz-input-number>小时开始
        </label>
        <label [ngStyle]="style" nz-radio nzValue="3">具体小时数(可多选)<nz-select nzMode="tags" [nzMaxTagCount]="3"
            [nzSize]="'small'" class="ml-sm" style="width: 70%;" nzPlaceHolder="请选择"
            [(ngModel)]="hour.specificSpecific">
            <nz-option *ngFor="let option of h24" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
        <label [ngStyle]="style" nz-radio nzValue="4">周期从<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="hour.rangeStart" [nzMin]="0" [nzMax]="23" [nzStep]="1"></nz-input-number>到
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="hour.rangeEnd" [nzMin]="0" [nzMax]="23"
            [nzStep]="1"></nz-input-number>小时
        </label>
      </nz-radio-group>
    </nz-tab>
    <nz-tab nzTitle="天">
      <nz-radio-group [(ngModel)]="day.cronEvery">
        <label [ngStyle]="style" nz-radio nzValue="1">每一天</label>
        <label [ngStyle]="style" nz-radio nzValue="2">每隔<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="week.incrementIncrement" [nzMin]="1" [nzMax]="7" [nzStep]="1"></nz-input-number>周执行，从
          <nz-select [nzSize]="'small'" class="ml-sm" style="width: 40%;" nzPlaceHolder="请选择"
            [(ngModel)]="week.incrementStart">
            <nz-option *ngFor="let option of ws" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select>开始
        </label>
        <label [ngStyle]="style" nz-radio nzValue="3">每隔<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="day.incrementIncrement" [nzMin]="1" [nzMax]="31" [nzStep]="1"></nz-input-number>天执行，从
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="day.incrementStart" [nzMin]="1"
            [nzMax]="31" [nzStep]="1"></nz-input-number>天开始
        </label>
        <label [ngStyle]="style" nz-radio nzValue="4">具体星期几(可多选)<nz-select nzMode="tags" [nzMaxTagCount]="3"
            [nzSize]="'small'" class="ml-sm" style="width: 70%;" nzPlaceHolder="请选择"
            [(ngModel)]="week.specificSpecific">
            <nz-option *ngFor="let option of w7" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
        <label [ngStyle]="style" nz-radio nzValue="5">具体天数(可多选)<nz-select nzMode="tags" [nzMaxTagCount]="3"
            [nzSize]="'small'" class="ml-sm" style="width: 70%;" nzPlaceHolder="请选择" [(ngModel)]="day.specificSpecific">
            <nz-option *ngFor="let option of d31" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
        <label [ngStyle]="style" nz-radio nzValue="6">在这个月的最后一天</label>
        <label [ngStyle]="style" nz-radio nzValue="7">在这个月的最后一个工作日</label>
        <label [ngStyle]="style" nz-radio nzValue="8">在这个月的最后一个<nz-select [nzSize]="'small'" class="ml-sm"
            style="width: 70%;" nzPlaceHolder="请选择" [(ngModel)]="day.cronLastSpecificDomDay">
            <nz-option *ngFor="let option of ws" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
        <label [ngStyle]="style" nz-radio nzValue="9">在本月底前<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="day.cronDaysBeforeEomMinus" [nzMin]="1" [nzMax]="31" [nzStep]="1"></nz-input-number>天</label>
        <label [ngStyle]="style" nz-radio nzValue="10">最近的工作日(周一至周五)至本月<nz-input-number class="ml-sm mr-sm"
            [nzSize]="'small'" [(ngModel)]="day.cronDaysNearestWeekday" [nzMin]="1" [nzMax]="31" [nzStep]="1">
          </nz-input-number>日</label>

        <label [ngStyle]="style" nz-radio nzValue="11">在这个月的第<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="week.cronNthDayNth" [nzMin]="1" [nzMax]="5" [nzStep]="1">
          </nz-input-number>个<nz-select [nzSize]="'small'" class="ml-sm" style="width: 50%;" nzPlaceHolder="请选择"
            [(ngModel)]="week.cronNthDayDay">
            <nz-option *ngFor="let option of ws" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
      </nz-radio-group>
    </nz-tab>
    <nz-tab nzTitle="月">
      <nz-radio-group [(ngModel)]="month.cronEvery">
        <label [ngStyle]="style" nz-radio nzValue="1">每一月</label>
        <label [ngStyle]="style" nz-radio nzValue="2">每隔<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="month.incrementIncrement" [nzMin]="0" [nzMax]="12" [nzStep]="1"></nz-input-number>月执行，从
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="month.incrementStart" [nzMin]="0"
            [nzMax]="12" [nzStep]="1"></nz-input-number>月开始
        </label>
        <label [ngStyle]="style" nz-radio nzValue="3">具体月数(可多选)<nz-select nzMode="tags" [nzMaxTagCount]="3"
            [nzSize]="'small'" class="ml-sm" style="width: 70%;" nzPlaceHolder="请选择"
            [(ngModel)]="month.specificSpecific">
            <nz-option *ngFor="let option of M12" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
        <label [ngStyle]="style" nz-radio nzValue="4">周期从<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="month.rangeStart" [nzMin]="1" [nzMax]="12" [nzStep]="1"></nz-input-number>到
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="month.rangeEnd" [nzMin]="1" [nzMax]="12"
            [nzStep]="1"></nz-input-number>月
        </label>
      </nz-radio-group>
    </nz-tab>
    <nz-tab nzTitle="年">
      <nz-radio-group [(ngModel)]="year.cronEvery">
        <label [ngStyle]="style" nz-radio nzValue="1">每一年</label>
        <label [ngStyle]="style" nz-radio nzValue="2">每隔<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="year.incrementIncrement" [nzMin]="1" [nzMax]="99" [nzStep]="1"></nz-input-number>年执行，从
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="year.incrementStart" [nzMin]="2019"
            [nzMax]="2119" [nzStep]="1"></nz-input-number>年开始
        </label>
        <label [ngStyle]="style" nz-radio nzValue="3">具体年份(可多选)<nz-select nzMode="tags" [nzMaxTagCount]="3"
            [nzSize]="'small'" class="ml-sm" style="width: 70%;" nzPlaceHolder="请选择"
            [(ngModel)]="year.specificSpecific">
            <nz-option *ngFor="let option of ys" [nzLabel]="option.label" [nzValue]="option.value">
            </nz-option>
          </nz-select></label>
        <label [ngStyle]="style" nz-radio nzValue="4">周期从<nz-input-number class="ml-sm mr-sm" [nzSize]="'small'"
            [(ngModel)]="year.rangeStart" [nzMin]="2019" [nzMax]="2119" [nzStep]="1"></nz-input-number>到
          <nz-input-number class="ml-sm mr-sm" [nzSize]="'small'" [(ngModel)]="year.rangeEnd" [nzMin]="2019"
            [nzMax]="2119" [nzStep]="1"></nz-input-number>
        </label>
      </nz-radio-group>
    </nz-tab>
  </nz-tabset>
  <div class="bottom">
    <div class="value mb-sm">
      cron表达式: <a (click)="api()" style="cursor: pointer" class="brand-color" nz-popover nzPopoverTrigger="click"
        nzPopoverTitle="最近5次运行时间" [nzPopoverContent]="contentTemplate">{{cron()}}</a>
      <ng-template #contentTemplate>
        <nz-spin [nzSpinning]="spinning">
          <div *ngFor="let d of decodes">{{d}}</div>
        </nz-spin>
      </ng-template>
    </div>
    <button (click)="save()" nz-button nzType="primary">确定</button>
    <button (click)="close()" nz-button nzType="default">取消</button>
  </div>
</div>
